package com.pig4cloud.pig.admin.emqx.openapi;

import com.pig4cloud.pig.admin.emqx.dto.CoapClientDto;
import com.pig4cloud.pig.admin.emqx.dto.EmqxClientQueryDto;
import com.pig4cloud.pig.admin.emqx.interceptor.EmqxFeignClientInterceptor;
import com.pig4cloud.pig.admin.emqx.vo.EmqxDataVo;
import com.pig4cloud.pig.admin.emqx.vo.MqttClientStats;
import com.pig4cloud.pig.common.feign.annotation.NoToken;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author lh
 */

@FeignClient(name = "emq-feign-client", configuration = EmqxFeignClientInterceptor.class, url = "${emqx.url}")
public interface EmqxFeignClient {
	@GetMapping("/api/v5/clients")
	@NoToken
	EmqxDataVo<MqttClientStats> getMqttClientStats(@SpringQueryMap EmqxClientQueryDto emqxClientQueryDto);
	@GetMapping("/api/v5/gateways/coap/clients/{clientid}/request")
	@NoToken
	EmqxDataVo<MqttClientStats> coapClients(@SpringQueryMap CoapClientDto coapClientDto);
}
